<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <div>
        <table class="table">
            <tr>
                <th>ID</th>
                <th>用户名称</th>
                <th>上一次登陆时间</th>
                <th>上一次登陆IP</th>
                <th>锁定状态</th>
                <th>用户所属组别</th>
                <th>操作</th>
            </tr>
            <foreach name="user" item="v">
                <tr>
                    <td>{$v.id}</td>
                    <td>{$v.username}</td>
                    <td>{$v.logintime|date='y-m-d H:i', ###}</td>
                    <td>{$v.loginip}</td>
                    <td>
                        <if condition="$v['lock']">锁定<else/>未锁定</if>
                    </td>
                    <td>
                        <if condition="$v['username']==C('RBAC_SUPERADMIN')">超级管理员
                            <else/>
                            <ul>
                                <foreach name="v.role" item="value">
                                    <li>{$value.name}({$value.remark})</li>
                                </foreach>
                            </ul>
                        </if>
                    </td>
                    <td>
                        <a href="{:U('editpwd',array('id'=>$v['id']))}">修改密码</a>
                    </td>
                    <td>
                        <a href="{:U('lock',array('id'=>$v['id'],'lock'=>$v['lock']))}"><if condition="$v['lock']">解锁<else />锁定</if></a>
                    </td>
                </tr>
            </foreach>
            <td colspan="10" align="center">
                <a href="{:U('addUser')}">添加用户</a>
            </td>
        </table>
    </div>




</body>
</html>